package com.panvan.android;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.webkit.DownloadListener;

public class WebViewDownloadListener implements DownloadListener {
    Context context;
    WebViewDownloadListener( Context _context){
        this.context=_context;
    }
    @Override
    public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,
                                long contentLength) {
        Uri uri = Uri.parse(url);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        context. startActivity(intent);
    }

}